package com.motong.gongdan.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.motong.gongdan.vo.system.otherVo.CustomFieldVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.List;

@Data
@TableName("user")
@Accessors(chain = true)
public class User {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String name;

    private String account;

    private String password;

    private String mobile;

    private String role;

    @TableField(value = "dep_id", updateStrategy = FieldStrategy.NOT_NULL)
    private String depId;

    private Integer state;

    @TableField("virtual_type")
    private Integer virtualType;

    @TableField("create_time")
    private Date createTime;

    @TableField("update_time")
    private Date updateTime;

    @TableField("h5_menu_id")
    private String h5MenuId;

    @TableField(exist = false)
    private List<SysMenu> h5Menu;

    @TableField("web_menu_id")
    private String webMenuId;

    @TableField(exist = false)
    private List<SysMenu> webMenu;

    @TableField(exist = false)
    private String depName;

    @TableField(value = "factory_id", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "工厂id")
    private Integer factoryId;

    @TableField(updateStrategy = FieldStrategy.IGNORED, value = "other")
    private String other;

    @TableField("openid")
    private String openid;

    @ApiModelProperty("工厂名称")
    @TableField(exist = false)
    private String factoryName;

    @ApiModelProperty("工厂code")
    @TableField(exist = false)
    private String factoryCode;

    @ApiModelProperty("默认图片")
    @TableField(exist = false)
    private String logoUrl;

    @TableField(exist = false)
    private List<CustomFieldVo> customFieldVos;
}
